package edu.kit.aifb.ldstream.learner;


import org.openrdf.model.URI;

import edu.kit.aifb.ldstream.env.Environment;

public final class LiteralChecker {

	private LiteralChecker(){}

	/**
	 * Checks whether the given URI is a URI of a quantitative Literal like XML.Date.
	 * @param uri to be checked.
	 * @return true if quantitative.
	 */
	public static boolean isContinuousLiteral(URI uri){
		if(uri != null){
			for(URI dataType : Environment.CONTINUOUS_DATATYPES){
				if(uri.equals(dataType)){
					return true;
				}
			}
		}
		return false;
	}
	
	/**
	 * Checks whether the given URI  a URI of a qualitative Literal like XML.Double.
	 * @param uri to be checked.
	 * @return true if qualitative.
	 */
	public static boolean isDiscreteLiteral(URI uri){
		if(uri != null){
			for(URI dataType : Environment.DISCRETE_DATATYPES){
				if(uri.equals(dataType)){
					return true;
				}
			}
		}
		return false;
	}
}
